package com.hz.ruoyistorage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hz.rouyigonggong.domain.LgUnit;
import com.hz.ruoyistorage.domain.LgUnitSe;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @version 1.0
 * @Author gj
 * @Date 2025/3/8 15:26
 * @注释
 */
public interface LgUnitSeMapper extends BaseMapper<LgUnitSe> {
    @Select("select * from lg_unit where unit_id = #{unitId}")
    public LgUnitSe selectById(Integer unitId);
    List<LgUnitSe> getReallyList(@Param("unitName") String unitName,
                                  @Param("beginTime") String beginTime,
                                  @Param("endTime") String endTime,
                                  @Param("firstNum") Integer firstNum,
                                  @Param("secondNum") Integer secondNum);
    int getCount(@Param("unitName") String unitName,
                 @Param("beginTime") String beginTime,
                 @Param("endTime") String endTime);
    @Update("UPDATE lg_unit SET unit_name = #{unitName}, " +
            "update_by = #{updateBy} " +
            "WHERE unit_id = #{unitId}")
    int updateById(LgUnitSe lgUnitSe);
    int deleteBatchIds(String[] unitIds);
}
